package com.linkvin.ec.hcs.dao.model.mdm;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 部门
 * </p>
 *
 * @author qichao
 * @since 2017-12-18
 */
@TableName("sys_department")
public class Department extends Model<Department> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 部门编号
     */
	private String code;
    /**
     * 部门名称
     */
	private String name;
    /**
     * 所属机构
     */
	@TableField("org_id")
	private Integer orgId;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getOrgId() {
		return orgId;
	}

	public void setOrgId(Integer orgId) {
		this.orgId = orgId;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Department{" +
			", id=" + id +
			", code=" + code +
			", name=" + name +
			", orgId=" + orgId +
			"}";
	}
}
